package rails;

/**
 * One type of junction with no rail at one side.
 * 
 * @author BERNARD Arthur, DELAMARCHE J�r�me, LE STER Olivier, PAVAGEAU Max
 *
 */
public class JButee extends Jonction {
	
	/**
	 * The rail connected to this junction.
	 * 
	 * @see Rail
	 */
	private Rail rail;
	
	/**
	 * A basic constructor.
	 */
	public JButee() {
		rail = null;
	}
	
	/**
	 * A constructor with the rail connected.
	 * 
	 * @param rail The rail connected to this junction.
	 */
	public JButee(Rail rail) {
		this.rail = rail;
	}

	/**
	 * Returns the rail connected to this junction.
	 * 
	 * @return The rail.
	 */
	public Rail getRail() {
		return rail; 
	}

	/**
	 * Set the rail of this junction.
	 * 
	 * @param rail The rail connected to this junction.
	 */
	public void setRail(Rail rail) {
		this.rail = rail;
	}

	public Rail railSuivant(Rail rail) {
		return null;
	}
	
	public String toString() {
		return "Je suis une butee";
	}
}
